package com.gxa.modules.pc.sys.usermanager.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.modules.pc.sys.usermanager.entity.SysTUser;
import com.gxa.modules.pc.sys.usermanager.mapper.SysTUserMapper;
import com.gxa.modules.pc.sys.usermanager.service.SysTUserService;
import com.gxa.modules.sys.entity.User;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gxa
 * @since 2022-11-19 07:04:22
 */
@Service
public class SysTUserServiceImpl extends ServiceImpl<SysTUserMapper, SysTUser> implements SysTUserService {
    @Autowired
    private SysTUserMapper sysTUserMapper;

    @Override
    public SysTUser queryByAccount(String account) {
        SysTUser sysTUser = sysTUserMapper.selectOne(new QueryWrapper<SysTUser>().eq(StringUtils.isNotEmpty(account), "account", account));
        return sysTUser;
    }

    @Override
    public List<String> selectByAccount(String account) {
        List<String> strings = sysTUserMapper.queryByAccount(account);
        return strings;
    }
}
